﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;

namespace d39
{
    public static class Colors
    {
        public static Color GetContrastColor(this Color color)
        {
            var sum = (int)color.R + (int)color.G + (int)color.B;
            return sum > (255 + 255 + 255) / 2 ? Color.Black : Color.White;
        }
    }
}